package com.imooc.domain;

import com.imooc.annotation.CustomSequence;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import lombok.Data;
import lombok.ToString;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.SQLRestriction;

/**
 * Description:
 * Author: gzj
 * Date: 2024/11/8 10:35
 */
@Data
@Entity
@Table(name = "test")
@ToString
@SQLRestriction("del_flag = 0")
@SQLDelete(sql = "update test set del_flag = 1 where id = ?")
public class Test {

    @Id
    @CustomSequence
    private String id;

    private String testName;

    private Integer testAge;

    private String testMsg;

    private Integer delFlag;
}
